
gl repo "~/Replication repo/"
gl data "~/Replication repo/data"

gl slvl "starlevels(* 0.10 ** 0.05 *** 0.01)"

use "$data/SG_county_data", clear

gl outcomes median_home logtimehome sh_home_all logdist
gl indepvars tweet_covid tweet_social_dist tweet_stay_home  post_tweet_social_dist post_tweet_stay_home
gl orders post_emergency post_gather post_schools post_resto post_neb post_stayhome
gl demogs med_age loginc sh_over65 sh_black sh_hisp sh_male pop_dens
gl covid covid_cases state_deaths
gl occshare sh_retail sh_service sh_manufa 
gl tweets post_tweet_covid post_tweet_social_dist


**TABLE 1: Summary Statistics**
eststo clear
eststo : estpost tabstat $outcomes, by(trump_county) c(stat) stat(mean sd) case

		estout using "$repo/sumstat_outcomes.tex", replace cells("mean(fmt(%9.2f))" "sd(par)") ///
		style(tex) mlabels(, none) unstack lab collabels(none) eqlabels(none)  

eststo clear
eststo : estpost tabstat $indepvars trump_margin, by(trump_county) c(stat) stat(mean sd) case
		estout using "$repo/sumstat_indepvars.tex", replace cells("mean(fmt(%9.2f))" "sd(par)") ///
		style(tex) mlabels(, none) unstack lab collabels(none) eqlabels(none)  

eststo clear
eststo : estpost tabstat $orders covid_cases $demogs $occshare, by(trump_county) c(stat) stat(mean sd) case
		estout using "$repo/sumstat_covars.tex", replace cells("mean(fmt(%9.2f))" "sd(par)") ///
		style(tex) mlabels(, none) unstack lab collabels(none) eqlabels(none)  


	eststo clear
		foreach x in dem_county trump_county esamp  {

		eststo : estpost tabstat esamp if `x'==1, c(stat) stat(n)

		}
		
		estout using "$repo/sumstat_covars_N.tex", replace cells("count(fmt(%9.0f))")  ///
		style(tex) mlabels(, none) unstack lab collabels(none) eqlabels(none) wrap

lab var esamp "Counties"
	
	eststo clear
		foreach x in dem_county trump_county esamp  {

		eststo : estpost tabstat esamp if `x'==1 & ctag==1, c(stat) stat(n)

		}
		
		estout using "$repo/sumstat_covars_Nclus.tex", replace cells("count(fmt(%9.0f))")  ///
		style(tex) mlabels(, none) unstack lab collabels(none) eqlabels(none) wrap


**TABLE 2: Governors’ Tweets, Partisanship, and Mobility**

replace trump_margin = trump_margin*10

//Panel A
eststo clear
foreach y in median_home logtimehome {
	
	eststo : reghdfe `y' post_tweet_stay_home $tweets $orders $covid , ///
	absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp)  keepsingle

	eststo : reghdfe `y' c.post_tweet_stay_home##c.trump_margin $tweets $covid $orders, ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp)  keepsingle

}
		
	estfe . est*, labels(ccode "County FE" day "Day FE" ///
		day#c.med_age "Demographics $\times$ Day FE" ///
		day#c.trump_margin "Trump margin $\times$ Day FE")
					

	#delimit ;
		estout
		using "$repo/mobility_panelA.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home
		 c.post_tweet_stay_home#c.trump_margin) 
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr

	#delimit ;
		estout
		using "$repo/mobility_footer.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(none,relax)
		indicate("County FE=0.ccode" "Day FE = 0.day" 
		"Demographics $\times$ Day FE = 0.day#c.med_age"
		"Trump margin $\times$ Day FE = 0.day#c.trump_margin" 
		"COVID controls = covid_cases"
		"Other tweets = post_tweet_social_dist"
		"Orders = post_stayhome")
		mlabels(, none) nobaselevels  ;
	#delimit cr

//Panel B
eststo clear
foreach y in median_home logtimehome {

	eststo : reghdfe `y' post_tweet_stay_home $tweets $covid $orders if trump_county==0, ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle
	eststo : reghdfe `y' post_tweet_stay_home $tweets $covid $orders  if trump_county==1, ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle

}
		
	#delimit ;
		estout
		using "$repo/mobility_panelB.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home) 
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr


//Panel C
eststo clear
foreach y in median_home logtimehome {

eststo : reghdfe `y' c.post_tweet_stay_home##c.rep_gov##c.trump_margin $tweets $covid $orders , ///
	absorb(ccode day day#c.($demogs) day#c.trump_margin day#c.rep_gov day#c.interact) cl(statefp) keepsingle

	eststo : reghdfe `y' c.post_tweet_stay_home##c.rep_gov##c.trump_county $tweets $covid $orders , ///
	absorb(ccode day day#c.($demogs) day#c.rep_gov day#c.trump_county day#c.inter) cl(statefp) keepsingle

	
	}
	
	
	estfe . est*, labels(ccode "County FE" day "Day FE" ///
		day#c.med_age "Demographics $\times$ Day FE" ///
		day#c.trump_county "GOP county $\times$ Day FE" ///
		day#c.trump_margin "Trump margin $\times$ Day FE" ///
		day#c.rep_gov "GOP gov $\times$ Day FE" ///
		day#c.inter "GOP county $\times$ GOP gov $\times$ Day FE" ///
		day#c.interact "Trump margin $\times$  GOP gov $\times$ Day FE")

	#delimit ;
		estout
		using "$repo/mobility_panelC.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home c.post_tweet_stay_home#c.rep_gov 
		c.post_tweet_stay_home#c.trump_county
		c.post_tweet_stay_home#c.rep_gov#c.trump_county
		c.post_tweet_stay_home#c.trump_margin
		c.post_tweet_stay_home#c.rep_gov#c.trump_margin) 
		indicate("GOP county $\times$ Day FE = 0.day#c.trump_county"
		"Trump margin $\times$ Day FE = 0.day#c.trump_margin" 
		"GOP gov $\times$ Day FE = 0.day#c.rep_gov" 
		 "GOP county $\times$ GOP gov $\times$ Day FE = 0.day#c.inter"
		"Trump margin $\times$  GOP gov $\times$ Day FE = 0.day#c.interact"
		"COVID controls = covid_cases"
		"Other tweets = post_tweet_social_dist"
		"Orders = post_stayhome")
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr

**TABLE 3: Governors’ Tweets and Stay-at-Home Orders**
eststo clear
foreach y in median_home logtimehome {
	
	eststo : reghdfe `y' post_tweet_stay_home $tweets $covid $orders , ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle
	
	lincom post_tweet_stay_home - post_stayhome
	
	estadd scalar diff = `r(estimate)'
	estadd scalar se = `r(se)'
		
	
	eststo : reghdfe `y' post_tweet_stay_home $tweets $covid $orders if  trump_county==0, ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle
	
	lincom post_tweet_stay_home - post_stayhome
	
	estadd scalar diff = `r(estimate)'
	estadd scalar se = `r(se)'


	eststo : reghdfe `y' post_tweet_stay_home $tweets $covid $orders if  trump_county==1, ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle
	
	lincom post_tweet_stay_home - post_stayhome
	
	estadd scalar diff = `r(estimate)'
	estadd scalar se = `r(se)'
	
	

	}
	
	estfe . est*, labels(ccode "County FE" day "Day FE" ///
		day#c.med_age "Demographics $\times$ Day FE" ///
		day#c.trump_margin "Trump margin $\times$ Day FE")

		
	#delimit ;
		estout
		using "$repo/mobility_DD_orders.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home post_stayhome) 
		mlabels(, none) nobaselevels 
		stats(diff se N r2, fmt(%9.3f %9.3f %9.0g  %9.3f) 
		labels(" $\beta_1-\beta_2$" " " "Observations" "\$R^2\$") layout(@ (@))) $slvl ;
	#delimit cr

	#delimit ;
		estout
		using "$repo/mobility_DD_orders_footer.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(none, relax) 
		indicate("County FE = 0.ccode"
		"Day FE = 0.day"
		"Demographics $\times$ Day FE = 0.day#c.med_age"
		"Trump margin $\times$ Day FE = 0.day#c.trump_margin"
		"COVID controls = $covid"
		"Other tweets = post_tweet_social_dist")
		mlabels(, none) nobaselevels  ;
	#delimit cr


****************************	
****SUPPLEMENTARY TABLES****
****************************

**TABLE SI-1: Governors’ tweets and Google searches**
use "$data/gtrends_dma_data", clear

foreach y in stay_at_home shelter_in_place {
eststo clear

	eststo : reghdfe `y' c.post_tweet_stay_home, absorb(dcode day day#c.trump_margin) cluster(scode)
	eststo : reghdfe  `y' c.post_tweet_stay_home##c.trump_margin, absorb(dcode day day#c.trump_margin) cluster(scode)

	eststo : reghdfe  `y' c.post_tweet_stay_home if trump_dma==0, absorb(dcode day day#c.trump_margin) cluster(scode)
	eststo : reghdfe  `y' c.post_tweet_stay_home if trump_dma==1, absorb(dcode day day#c.trump_margin) cluster(scode)

	eststo : reghdfe  `y' c.post_tweet_stay_home##c.rep_gov if trump_dma==0, absorb(dcode day day#c.rep_gov day#c.trump_margin) cluster(scode)
	eststo : reghdfe  `y' c.post_tweet_stay_home##c.rep_gov if trump_dma==1, absorb(dcode day  day#c.rep_gov day#c.trump_margin) cluster(scode)
	


 		estfe . est*, labels(dcode "County FE" day "Day FE" ///
		day#c.trump_margin "Trump margin $\times$ Day FE" ///
		day#c.rep_gov "GOP gov $\times$ Day FE")

 
 	#delimit ;
		estout
		using "$repo/`y'_gtrends_DDD.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home c.post_tweet_stay_home#c.trump_margin 
		c.post_tweet_stay_home#c.rep_gov) 
		indicate("DMA FE=0.dcode"  "Day FE = 0.day" 
		"Trump margin $\times$ Day FE = 0.day#c.trump_margin"
		"GOP gov $\times$ Day FE = 0.day#c.rep_gov")
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr
	
	
	}

	
**TABLE SI-2: Governors’ tweets before and after stay home orders

eststo clear
foreach y in median_home {

forvalues i = 0/1 {

foreach d in 3 5 {

	eststo : reghdfe `y' cumul_stay_home_`d'd $covid $tweets if post_stayhome==`i', ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle

	}
	
	eststo : reghdfe `y' post_tweet_stay_home $covid $tweets if post_stayhome==`i', ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle

	eststo : reghdfe `y' lag_tweet $covid $tweets if post_stayhome==`i', ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle
	
}
	
}
	estfe . est*, labels(ccode "County FE" day "Day FE" ///
		day#c.med_age "Demographics $\times$ Day FE" ///
		day#c.trump_margin "Trump margin $\times$ Day FE")


	#delimit ;
		estout
		using "$repo/mobility_by_order_date.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(cumul_stay_home_5d cumul_stay_home_3d post_tweet_stay_home lag_tweet) 
		mlabels(, none) nobaselevels 
		indicate("County FE=0.ccode" "Day FE = 0.day" 
		"Demographics $\times$ Day FE = 0.day#c.med_age"
		"Trump margin $\times$ Day FE = 0.day#c.trump_margin"
		"COVID controls = covid_cases"
		"Other tweets = post_tweet_social_dist")
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr

**TABLE SI-3: Governors’ stay home tweets and mobility, by governor’s party**

eststo clear
foreach y in median_home logtimehome {
	
	eststo : reghdfe `y' post_tweet_stay_home $tweets $covid $orders if rep_gov==0, ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle

	eststo : reghdfe `y' c.post_tweet_stay_home##c.trump_margin $tweets $covid $orders  if rep_gov==0, ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle


}
	#delimit ;
		estout
		using "$repo/mobility_panelA_demgov.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home c.post_tweet_stay_home#c.trump_margin) 
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr

eststo clear
foreach y in median_home logtimehome {
	
	eststo : reghdfe `y' post_tweet_stay_home $tweets $covid $orders if rep_gov==1, ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle

	eststo : reghdfe `y' c.post_tweet_stay_home##c.trump_margin $tweets $covid $orders  if rep_gov==1, ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle
	

}

	#delimit ;
		estout
		using "$repo/mobility_panelB_GOPgov.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home c.post_tweet_stay_home#c.trump_margin) 
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr

	estfe . est*, labels(ccode "County FE" day "Day FE" ///
		day#c.med_age "Demographics $\times$ Day FE" ///
		day#c.trump_margin "Trump margin $\times$ Day FE")
		
	#delimit ;
		estout
		using "$repo/mobility_by_gov_party_footer.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(none,relax) 
		mlabels(, none) nobaselevels 
		indicate("County FE=0.ccode" "Day FE = 0.day" 
		"Demographics $\times$ Day FE = 0.day#c.med_age"
		"Trump margin $\times$ Day FE = 0.day#c.trump_margin"
		"COVID controls = covid_cases"
		"Other tweets = post_tweet_social_dist"
		"Orders = post_stayhome") ;
	#delimit cr
	
**TABLE SI-4: Governors’ stay home tweets and mobility, robustness to covariates**

gl confounders $occshare loginc pop_dens

//PANEL A
eststo clear

eststo : reghdfe median_home c.post_tweet_stay_home $tweets $orders $covid , ///
absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp)  keepsingle

eststo : reghdfe median_home c.post_tweet_stay_home $tweets $orders $covid , ///
absorb(ccode day day#c.trump_margin day#c.($demogs $occshare)) cl(statefp)  keepsingle

eststo : reghdfe median_home c.post_tweet_stay_home##c.(trump_margin) $tweets $orders $covid , ///
absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp)  keepsingle

foreach c in $confounders {

eststo : reghdfe median_home c.post_tweet_stay_home##c.(trump_margin `c') $tweets $orders $covid , ///
absorb(ccode day day#c.trump_margin day#c.($demogs $occshare)) cl(statefp)  keepsingle
	
	}
	
	#delimit ;
		estout
		using "$repo/mobility_rob_covars_panelA.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home c.post_tweet_stay_home#c.trump_margin
		c.post_tweet_stay_home#c.sh_retail
		c.post_tweet_stay_home#c.sh_service
		c.post_tweet_stay_home#c.sh_manufac
		c.post_tweet_stay_home#c.loginc
		c.post_tweet_stay_home#c.pop_dens) 
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr
	

//PANEL B
eststo clear
eststo : reghdfe median_home c.post_tweet_stay_home $tweets $orders $covid if rep_gov==0, ///
absorb(ccode day day#c.trump_margin day#c.($demogs )) cl(statefp)  keepsingle

eststo : reghdfe median_home c.post_tweet_stay_home $tweets $orders $covid if rep_gov==0, ///
absorb(ccode day day#c.trump_margin day#c.($demogs $occshare)) cl(statefp)  keepsingle

eststo : reghdfe median_home c.post_tweet_stay_home##c.(trump_margin) $tweets $orders $covid if rep_gov==0, ///
absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp)  keepsingle

foreach c in $confounders {
eststo : reghdfe median_home c.post_tweet_stay_home##c.(trump_margin `c') $tweets $orders $covid if rep_gov==0, ///
absorb(ccode day day#c.trump_margin day#c.($demogs $occshare)) cl(statefp)  keepsingle
	
	}
	
		#delimit ;
		estout
		using "$repo/mobility_rob_covars_panelB.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home c.post_tweet_stay_home#c.trump_margin
		c.post_tweet_stay_home#c.sh_retail
		c.post_tweet_stay_home#c.sh_service
		c.post_tweet_stay_home#c.sh_manufac
		c.post_tweet_stay_home#c.loginc
		c.post_tweet_stay_home#c.pop_dens) 
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr

	
//Panel C
eststo clear
eststo : reghdfe median_home c.post_tweet_stay_home $tweets $orders $covid if rep_gov==1, ///
absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp)  keepsingle

eststo : reghdfe median_home c.post_tweet_stay_home $tweets $orders $covid if rep_gov==1, ///
absorb(ccode day day#c.trump_margin day#c.($demogs $occshare)) cl(statefp)  keepsingle

eststo : reghdfe median_home c.post_tweet_stay_home##c.(trump_margin) $tweets $orders $covid if rep_gov==1, ///
absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp)  keepsingle

foreach c in $confounders {
eststo : reghdfe median_home c.post_tweet_stay_home##c.(trump_margin `c') $tweets $orders $covid if rep_gov==1, ///
absorb(ccode day day#c.trump_margin day#c.($demogs $occshare)) cl(statefp)  keepsingle
	
	}
	
	#delimit ;
		estout
		using "$repo/mobility_rob_covars_panelC.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home c.post_tweet_stay_home#c.trump_margin
		c.post_tweet_stay_home#c.sh_retail
		c.post_tweet_stay_home#c.sh_service
		c.post_tweet_stay_home#c.sh_manufac
		c.post_tweet_stay_home#c.loginc
		c.post_tweet_stay_home#c.pop_dens) 
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr


	estfe . est*, labels(ccode "County FE" day "Day FE" ///
		day#c.med_age "Demographics $\times$ Day FE" ///
		day#c.sh_retail "Occupation shares $\times$ Day FE" ///
		day#c.trump_margin "Trump margin $\times$ Day FE")
	
	#delimit ;
		estout
		using "$repo/mobility_rob_covars_footer.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(none, relax) 
		indicate("Trump margin $\times$ Day FE = 0.day#c.trump_margin" 
		"Demographics $\times$ Day FE = 0.day#c.med_age"
		"Occupation shares $\times$ Day FE = 0.day#c.sh_retail"
		"COVID controls = covid_cases"
		"Other tweets = post_tweet_social_dist"
		"Orders = post_stayhome")
		mlabels(, none) nobaselevels  ;
	#delimit cr
	
**TABLE SI-5: Governors’ stay home tweets and mobility, robustness to media exposure**

gl mediavars tv_news cable_news social_media social_media_pol

//PANEL A
eststo clear
eststo : reghdfe median_home c.post_tweet_stay_home $tweets $orders $covid if samp==1, ///
absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp)  keepsingle

eststo : reghdfe median_home c.post_tweet_stay_home $tweets $orders $covid if samp==1, ///
absorb(ccode day day#c.trump_margin day#c.($demogs $mediavars)) cl(statefp)  keepsingle

eststo : reghdfe median_home c.post_tweet_stay_home##c.(trump_margin) $tweets $orders $covid if samp==1, ///
absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp)  keepsingle

foreach c in $mediavars {

eststo : reghdfe median_home c.post_tweet_stay_home##c.(trump_margin `c') $tweets $orders $covid if samp==1, ///
absorb(ccode day day#c.trump_margin day#c.($demogs $mediavars)) cl(statefp)  keepsingle
	
	}
	
	#delimit ;
		estout
		using "$repo/mobility_rob_media_panelA.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home c.post_tweet_stay_home#c.trump_margin
		c.post_tweet_stay_home#c.tv_news
		c.post_tweet_stay_home#c.cable_news
		c.post_tweet_stay_home#c.social_media
		c.post_tweet_stay_home#c.social_media_pol) 
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr

//PANEL B
eststo clear
eststo : reghdfe median_home c.post_tweet_stay_home $tweets $orders $covid if samp==1 & rep_gov==0, ///
absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp)  keepsingle

eststo : reghdfe median_home c.post_tweet_stay_home $tweets $orders $covid if samp==1 & rep_gov==0, ///
absorb(ccode day day#c.trump_margin day#c.($demogs $mediavars)) cl(statefp)  keepsingle

eststo : reghdfe median_home c.post_tweet_stay_home##c.(trump_margin) $tweets $orders $covid if samp==1 & rep_gov==0, ///
absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp)  keepsingle

foreach c in $mediavars {

eststo : reghdfe median_home c.post_tweet_stay_home##c.(trump_margin `c') $tweets $orders $covid if samp==1 & rep_gov==0, ///
absorb(ccode day day#c.trump_margin day#c.($demogs $mediavars)) cl(statefp)  keepsingle
	
	}
	
	#delimit ;
		estout
		using "$repo/mobility_rob_media_panelB.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home c.post_tweet_stay_home#c.trump_margin
		c.post_tweet_stay_home#c.tv_news
		c.post_tweet_stay_home#c.cable_news
		c.post_tweet_stay_home#c.social_media
		c.post_tweet_stay_home#c.social_media_pol) 
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr

//PANEL C
eststo clear
eststo : reghdfe median_home c.post_tweet_stay_home $tweets $orders $covid if samp==1 & rep_gov==1, ///
absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp)  keepsingle

eststo : reghdfe median_home c.post_tweet_stay_home $tweets $orders $covid if samp==1 & rep_gov==1, ///
absorb(ccode day day#c.trump_margin day#c.($demogs $mediavars)) cl(statefp)  keepsingle

eststo : reghdfe median_home c.post_tweet_stay_home##c.(trump_margin) $tweets $orders $covid if samp==1 & rep_gov==1, ///
absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp)  keepsingle

foreach c in $mediavars {

eststo : reghdfe median_home c.post_tweet_stay_home##c.(trump_margin `c') $tweets $orders $covid if samp==1 & rep_gov==1, ///
absorb(ccode day day#c.trump_margin day#c.($demogs $mediavars)) cl(statefp)  keepsingle
	
	}
	
	#delimit ;
		estout
		using "$repo/mobility_rob_media_panelC.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home c.post_tweet_stay_home#c.trump_margin
		c.post_tweet_stay_home#c.tv_news
		c.post_tweet_stay_home#c.cable_news
		c.post_tweet_stay_home#c.social_media
		c.post_tweet_stay_home#c.social_media_pol) 
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr

	estfe . est*, labels(ccode "County FE" day "Day FE" ///
		day#c.med_age "Demographics $\times$ Day FE" ///
		day#c.tv_news "Media covariates $\times$ Day FE" ///
		day#c.trump_margin "Trump margin $\times$ Day FE")
	
	#delimit ;
		estout
		using "$repo/mobility_rob_media_footer.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(none, relax) 
		indicate("Trump margin $\times$ Day FE = 0.day#c.trump_margin" 
		"Demographics $\times$ Day FE = 0.day#c.med_age"
		"Occupation shares $\times$ Day FE = 0.day#c.tv_news"
		"COVID controls = covid_cases"
		"Other tweets = post_tweet_social_dist"
		"Orders = post_stayhome")
		mlabels(, none) nobaselevels  ;
	#delimit cr

**TABLE SI-6: Governors’ tweets, partisanship, and mobility, robustness to different outcome variables**

eststo clear
foreach y in sh_home_all logdist {
	
	eststo : reghdfe `y' post_tweet_stay_home $tweets  $orders $covid , ///
	absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp)  keepsingle

	eststo : reghdfe `y' c.post_tweet_stay_home##c.trump_margin $tweets $covid $orders, ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp)  keepsingle

}
		
	#delimit ;
		estout
		using "$repo/mobility_panelA_rob_outcomes.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home
		 c.post_tweet_stay_home#c.trump_margin) 
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr
	

//Panel B
eststo clear
foreach y in sh_home_all logdist {

	eststo : reghdfe `y' post_tweet_stay_home $tweets $covid $orders if trump_county==0, ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle
	eststo : reghdfe `y' post_tweet_stay_home $tweets $covid $orders  if trump_county==1, ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle

}
		
	#delimit ;
		estout
		using "$repo/mobility_panelB_rob_outcomes.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home) 
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr


//Panel C
eststo clear
foreach y in sh_home_all logdist {

eststo : reghdfe `y' c.post_tweet_stay_home##c.rep_gov##c.trump_margin $tweets $covid $orders , ///
	absorb(ccode day day#c.($demogs) day#c.trump_margin day#c.rep_gov day#c.interact) cl(statefp) keepsingle

	eststo : reghdfe `y' c.post_tweet_stay_home##c.rep_gov##c.trump_county $tweets $covid $orders , ///
	absorb(ccode day day#c.($demogs) day#c.rep_gov day#c.trump_county day#c.inter) cl(statefp) keepsingle

	
	}
	
	estfe . est*, labels(ccode "County FE" day "Day FE" ///
		day#c.med_age "Demographics $\times$ Day FE" ///
		day#c.trump_county "GOP county $\times$ Day FE" ///
		day#c.trump_margin "Trump margin $\times$ Day FE" ///
		day#c.rep_gov "GOP gov $\times$ Day FE" ///
		day#c.inter "GOP county $\times$ GOP gov $\times$ Day FE" ///
		day#c.interact "Trump margin $\times$  GOP gov $\times$ Day FE")

	#delimit ;
		estout
		using "$repo/mobility_panelC_rob_outcomes.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home c.post_tweet_stay_home#c.rep_gov 
		c.post_tweet_stay_home#c.trump_county
		c.post_tweet_stay_home#c.rep_gov#c.trump_county
		c.post_tweet_stay_home#c.trump_margin
		c.post_tweet_stay_home#c.rep_gov#c.trump_margin) 
		indicate("GOP county $\times$ Day FE = 0.day#c.trump_county"
		"Trump margin $\times$ Day FE = 0.day#c.trump_margin" 
		"GOP gov $\times$ Day FE = 0.day#c.rep_gov" 
		 "GOP county $\times$ GOP gov $\times$ Day FE = 0.day#c.inter"
		"Trump margin $\times$  GOP gov $\times$ Day FE = 0.day#c.interact")
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr

	

**Table SI-7: Governors’ tweets, by content of tweet**
eststo clear
foreach y in median_home logtime sh_home_all logdist {

	eststo : reghdfe `y' post_tweet_stay_home  $covid $orders , ///
	absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle

	eststo : reghdfe `y' post_tweet_social_dist $covid $orders, ///
	absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle

	eststo : reghdfe `y' post_tweet_social_dist post_tweet_stay_home $covid $orders, ///
	absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle

	}


		
	estfe . est*, labels(ccode "County FE" day "Day FE" ///
		day#c.med_age "Demographics $\times$ Day FE" ///
		day#c.trump_margin "Trump margin $\times$ Day FE")

	#delimit ;
		estout
		using "$repo/mobility_all_tweets.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home
		 post_tweet_social_dist) 
		mlabels(, none) nobaselevels 
		indicate("County FE=0.ccode" "Day FE = 0.day" 
		"Demographics $\times$ Day FE = 0.day#c.med_age"
		"Trump margin $\times$ Day FE = 0.day#c.trump_margin" 
		"COVID cases = covid_cases"
		"Orders = post_stayhome")
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr
	


**Table SI-8: Governors’ social distancing tweets, partisanship and mobility**

//Panel A
eststo clear
foreach y in median_home logtimehome {
	
	eststo : reghdfe `y' post_tweet_social_dist  $orders $covid , ///
	absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp)  keepsingle

	eststo : reghdfe `y' c.post_tweet_social_dist##c.trump_margin $covid $orders, ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp)  keepsingle

}
		
	estfe . est*, labels(ccode "County FE" day "Day FE" ///
		day#c.med_age "Demographics $\times$ Day FE" ///
		day#c.trump_margin "Trump margin $\times$ Day FE")
					

	#delimit ;
		estout
		using "$repo/mobility_panelA_socdist.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_social_dist
		 c.post_tweet_social_dist#c.trump_margin) 
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr

	#delimit ;
		estout
		using "$repo/mobility_footer_socdist.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(none,relax)
		indicate("County FE=0.ccode" "Day FE = 0.day" 
		"Demographics $\times$ Day FE = 0.day#c.med_age"
		"Trump margin $\times$ Day FE = 0.day#c.trump_margin" 
		"COVID controls = covid_cases"
		"Orders = post_stayhome")
		mlabels(, none) nobaselevels  ;
	#delimit cr

//Panel B
eststo clear
foreach y in median_home logtimehome {

	eststo : reghdfe `y' post_tweet_social_dist $covid $orders if trump_county==0, ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle
	eststo : reghdfe `y' post_tweet_social_dist $covid $orders  if trump_county==1, ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle

}
		
	#delimit ;
		estout
		using "$repo/mobility_panelB_socdist.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_social_dist) 
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr


//Panel C
eststo clear
foreach y in median_home logtimehome {

eststo : reghdfe `y' c.post_tweet_social_dist##c.rep_gov##c.trump_margin $covid $orders , ///
	absorb(ccode day day#c.($demogs) day#c.trump_margin day#c.rep_gov day#c.interact) cl(statefp) keepsingle

	eststo : reghdfe `y' c.post_tweet_social_dist##c.rep_gov##c.trump_county $covid $orders , ///
	absorb(ccode day day#c.($demogs) day#c.rep_gov day#c.trump_county day#c.inter) cl(statefp) keepsingle

	}
	
	
	estfe . est*, labels(ccode "County FE" day "Day FE" ///
		day#c.med_age "Demographics $\times$ Day FE" ///
		day#c.trump_county "GOP county $\times$ Day FE" ///
		day#c.trump_margin "Trump margin $\times$ Day FE" ///
		day#c.rep_gov "GOP gov $\times$ Day FE" ///
		day#c.inter "GOP county $\times$ GOP gov $\times$ Day FE" ///
		day#c.interact "Trump margin $\times$  GOP gov $\times$ Day FE")

	#delimit ;
		estout
		using "$repo/mobility_panelC_socdist.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_social_dist c.post_tweet_social_dist#c.rep_gov 
		c.post_tweet_social_dist#c.trump_county
		c.post_tweet_social_dist#c.rep_gov#c.trump_county
		c.post_tweet_social_dist#c.trump_margin
		c.post_tweet_social_dist#c.rep_gov#c.trump_margin) 
		indicate("GOP county $\times$ Day FE = 0.day#c.trump_county"
		"Trump margin $\times$ Day FE = 0.day#c.trump_margin" 
		"GOP gov $\times$ Day FE = 0.day#c.rep_gov" 
		 "GOP county $\times$ GOP gov $\times$ Day FE = 0.day#c.inter"
		"Trump margin $\times$  GOP gov $\times$ Day FE = 0.day#c.interact")
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr


***Table SI-9: Governors’ tweets, partisanship and mobility, random effects****
xtset ccode day

//Panel A
eststo clear
foreach y in median_home logtimehome {
	
	eststo : xtreg `y' post_tweet_stay_home $tweets $covid $orders i.day i.day#c.(trump_margin) $demogs, re cl(statefp)

	eststo : xtreg `y' c.post_tweet_stay_home##c.trump_margin $tweets  $covid $orders  $demogs i.day i.day#c.(trump_margin), ///
		re cl(statefp)

}
		
	#delimit ;
		estout
		using "$repo/mobility_panelA_RE.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home
		 c.post_tweet_stay_home#c.trump_margin) 
		mlabels(, none) nobaselevels 
		stats(N r2_o, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr

	#delimit ;
		estout
		using "$repo/mobility_footer_RE.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(none,relax)
		indicate("Day FE = *day" 
		"Demographics = med_age"
		"Trump margin $\times$ Day FE = *day#c.trump_margin"
		"COVID controls = covid_cases"
		"Other tweets = post_tweet_social_dist"
		"Orders = post_stayhome")
		mlabels(, none) nobaselevels  ;
	#delimit cr

//Panel B
eststo clear
foreach y in median_home logtimehome {

	eststo : xtreg `y' post_tweet_stay_home $tweets  $covid $orders $demogs i.day i.day#c.(trump_margin)  ///
		if trump_county==0, re cl(statefp)

	eststo : xtreg `y' c.post_tweet_stay_home $tweets  $covid $orders $demogs i.day i.day#c.(trump_margin) ///
		if trump_county==1, re cl(statefp)

}
		
	#delimit ;
		estout
		using "$repo/mobility_panelB_RE.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home) 
		mlabels(, none) nobaselevels 
		stats(N r2_o, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr


//Panel C
eststo clear
foreach y in median_home logtimehome {

	eststo : xtreg `y' c.post_tweet_stay_home##c.rep_gov##c.trump_margin $tweets  $covid $orders $demogs i.day i.day#c.(rep_gov) ///
		i.day#c.(trump_margin) i.day#c.interact, re cl(statefp)

	eststo : xtreg `y' c.post_tweet_stay_home##c.rep_gov##c.trump_county $tweets  $covid $orders $demogs i.day i.day#c.(rep_gov) ///
		i.day#c.(trump_county) i.day#c.inter, re cl(statefp)

	
	}
				
	#delimit ;
		estout
		using "$repo/mobility_panelC_RE.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home c.post_tweet_stay_home#c.rep_gov 
		c.post_tweet_stay_home#c.trump_county
		c.post_tweet_stay_home#c.rep_gov#c.trump_county
		c.post_tweet_stay_home#c.trump_margin
		c.post_tweet_stay_home#c.rep_gov#c.trump_margin) 
		mlabels(, none) nobaselevels 
		indicate("Day FE = *day" 
		"Demographics = med_age"
		"Trump margin $\times$ Day FE = *day#c.trump_margin"
		"GOP county $\times$ Day FE = *day#c.trump_county"
		"GOP gov $\times$ Day FE = *day#c.rep_gov"
		"Trump margin $\times$ GOP gov $\times$ Day FE = *day#c.interact"
		"GOP county $\times$ GOP gov $\times$ Day FE = *day#c.inter")
		stats(N r2_o, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr

**Table SI-10: Governors’ tweets, partisanship, and mobility, robustness to population weights**

//Panel A
eststo clear
foreach y in median_home_dwell logtimehome {
	
	eststo : reghdfe `y' post_tweet_stay_home $tweets $orders $covid [aw=tot_pop] , ///
	absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp)  keepsingle

	eststo : reghdfe `y' c.post_tweet_stay_home##c.trump_margin $tweets $covid $orders [aw=tot_pop], ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp)  keepsingle

}
		
	estfe . est*, labels(ccode "County FE" day "Day FE" ///
		day#c.med_age "Demographics $\times$ Day FE" ///
		day#c.trump_margin "Trump margin $\times$ Day FE")
					

	#delimit ;
		estout
		using "$repo/mobility_panelA_popwt.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home
		 c.post_tweet_stay_home#c.trump_margin) 
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr


//Panel B
eststo clear
foreach y in median_home_dwell logtimehome {

	eststo : reghdfe `y' post_tweet_stay_home $covid $orders $tweets [aw=tot_pop] if trump_county==0, ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle
	eststo : reghdfe `y' post_tweet_stay_home $covid $orders $tweets  [aw=tot_pop] if trump_county==1, ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle

}
		
	#delimit ;
		estout
		using "$repo/mobility_panelB_popwt.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home) 
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr


//Panel C
eststo clear
foreach y in median_home_dwell logtimehome {

eststo : reghdfe `y' c.post_tweet_stay_home##c.rep_gov##c.trump_margin $tweets $covid $orders [aw=tot_pop], ///
	absorb(ccode day day#c.($demogs) day#c.trump_margin day#c.rep_gov day#c.interact) cl(statefp) keepsingle

	eststo : reghdfe `y' c.post_tweet_stay_home##c.rep_gov##c.trump_county $tweets $covid $orders [aw=tot_pop], ///
	absorb(ccode day day#c.($demogs) day#c.rep_gov day#c.trump_county day#c.inter) cl(statefp) keepsingle

	
	}
	
	
	
	estfe . est*, labels(ccode "County FE" day "Day FE" ///
		day#c.med_age "Demographics $\times$ Day FE" ///
		day#c.trump_county "GOP county $\times$ Day FE" ///
		day#c.trump_margin "Trump margin $\times$ Day FE" ///
		day#c.rep_gov "GOP gov $\times$ Day FE" ///
		day#c.inter "GOP county $\times$ GOP gov $\times$ Day FE" ///
		day#c.interact "Trump margin $\times$  GOP gov $\times$ Day FE")

	#delimit ;
		estout
		using "$repo/mobility_panelC_popwt.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home c.post_tweet_stay_home#c.rep_gov 
		c.post_tweet_stay_home#c.trump_county
		c.post_tweet_stay_home#c.rep_gov#c.trump_county
		c.post_tweet_stay_home#c.trump_margin
		c.post_tweet_stay_home#c.rep_gov#c.trump_margin) 
		indicate("GOP county $\times$ Day FE = 0.day#c.trump_county"
		"Trump margin $\times$ Day FE = 0.day#c.trump_margin" 
		"GOP gov $\times$ Day FE = 0.day#c.rep_gov" 
		 "GOP county $\times$ GOP gov $\times$ Day FE = 0.day#c.inter"
		"Trump margin $\times$  GOP gov $\times$ Day FE = 0.day#c.interact")
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr
	
	
**Table SI-11: Governors’ stay home tweets and mobility by governor’s party, robustness to population weights**

//Panel A
eststo clear
foreach y in median_home_dwell logtimehome {
	
	eststo : reghdfe `y' post_tweet_stay_home $tweets $covid $orders  [aw=tot_pop] if rep_gov==0, ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle

	eststo : reghdfe `y' c.post_tweet_stay_home##c.trump_margin $tweets  $covid $orders [aw=tot_pop] if rep_gov==0, ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle
		

}
	#delimit ;
		estout
		using "$repo/mobility_panelA_demgov_popwt.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home c.post_tweet_stay_home#c.trump_margin) 
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr

//Panel B
eststo clear
foreach y in median_home_dwell logtimehome {
	
	eststo : reghdfe `y' post_tweet_stay_home $tweets  $covid $orders [aw=tot_pop] if rep_gov==1, ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle

	eststo : reghdfe `y' c.post_tweet_stay_home##c.trump_margin $tweets  $covid $orders [aw=tot_pop] if rep_gov==1, ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle
	


}

	#delimit ;
		estout
		using "$repo/mobility_panelB_GOPgov_popwt.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home c.post_tweet_stay_home#c.trump_margin) 
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr
	

**Table SI-12: Governors’ tweets, partisanship, and mobility, robustness to outliers**

su value if values ==2.5
local min = `r(mean)'
su value if values ==97.5
local max = `r(mean)'

//Panel A
eststo clear
foreach z in "if inrange(median_home_dwell,`min',`max')" "if device_sh>=0.05"  {
	
	eststo : reghdfe median_home_dwell  post_tweet_stay_home $tweets $orders $covid `z', ///
	absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp)  keepsingle
	
	eststo : reghdfe median_home_dwell c.post_tweet_stay_home##c.trump_margin $tweets $covid $orders `z', ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp)  keepsingle

}
		
	estfe . est*, labels(ccode "County FE" day "Day FE" ///
		day#c.med_age "Demographics $\times$ Day FE" ///
		day#c.trump_margin "Trump margin $\times$ Day FE")
					

	#delimit ;
		estout
		using "$repo/mobility_outliers_panelA.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home
		 c.post_tweet_stay_home#c.trump_margin) 
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr

//Panel B
eststo clear
foreach z in "inrange(median_home_dwell,`min',`max')" "device_sh>=0.05"  {

	eststo : reghdfe median_home_dwell post_tweet_stay_home $tweets $covid $orders if trump_county==0 & `z', ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle
	eststo : reghdfe median_home_dwell post_tweet_stay_home $tweets $covid $orders  if trump_county==1 & `z', ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle

}
		
	#delimit ;
		estout
		using "$repo/mobility_outliers_panelB.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home) 
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr


//Panel C
eststo clear
foreach z in "if inrange(median_home_dwell,`min',`max')" "if device_sh>=0.05"  {

eststo : reghdfe median_home_dwell c.post_tweet_stay_home##c.rep_gov##c.trump_margin $tweets $covid $orders `z', ///
	absorb(ccode day day#c.($demogs) day#c.trump_margin day#c.rep_gov day#c.interact) cl(statefp) keepsingle

	eststo : reghdfe median_home_dwell c.post_tweet_stay_home##c.rep_gov##c.trump_county $tweets $covid $orders `z', ///
	absorb(ccode day day#c.($demogs) day#c.rep_gov day#c.trump_county day#c.inter) cl(statefp) keepsingle

	
	}
	
	
	
	estfe . est*, labels(ccode "County FE" day "Day FE" ///
		day#c.med_age "Demographics $\times$ Day FE" ///
		day#c.trump_county "GOP county $\times$ Day FE" ///
		day#c.trump_margin "Trump margin $\times$ Day FE" ///
		day#c.rep_gov "GOP gov $\times$ Day FE" ///
		day#c.inter "GOP county $\times$ GOP gov $\times$ Day FE" ///
		day#c.interact "Trump margin $\times$  GOP gov $\times$ Day FE")

	#delimit ;
		estout
		using "$repo/mobility_outliers_panelC.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home c.post_tweet_stay_home#c.rep_gov 
		c.post_tweet_stay_home#c.trump_county
		c.post_tweet_stay_home#c.rep_gov#c.trump_county
		c.post_tweet_stay_home#c.trump_margin
		c.post_tweet_stay_home#c.rep_gov#c.trump_margin) 
		indicate("GOP county $\times$ Day FE = 0.day#c.trump_county"
		"Trump margin $\times$ Day FE = 0.day#c.trump_margin" 
		"GOP gov $\times$ Day FE = 0.day#c.rep_gov" 
		 "GOP county $\times$ GOP gov $\times$ Day FE = 0.day#c.inter"
		"Trump margin $\times$  GOP gov $\times$ Day FE = 0.day#c.interact"
		"COVID controls = covid_cases"
		"Other tweets = post_tweet_social_dist"
		"Orders = post_stayhome")
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr


***Table SI-13: Governors’ tweets, partisanship, and mobility, robustness to local orders***

gl local local_policy_active cumul_local_policies sh_pop_covered 

eststo clear
	
	eststo : reghdfe median_home_dwell post_tweet_stay_home $tweets $orders $covid , ///
	absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp)  keepsingle

	
foreach z in $local {

	eststo : reghdfe median_home_dwell post_tweet_stay_home `z' $tweets $orders $covid , ///
	absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp)  keepsingle
	
	
	}
		
		
	eststo : reghdfe median_home_dwell c.post_tweet_stay_home##c.trump_margin $tweets $covid $orders, ///
	absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp)  keepsingle

foreach z in $local {

	eststo : reghdfe median_home_dwell c.(post_tweet_stay_home )##c.trump_margin `z' $tweets $orders $covid , ///
	absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp)  keepsingle
	
	
	}

	estfe . est*, labels(ccode "County FE" day "Day FE" ///
		day#c.med_age "Demographics $\times$ Day FE" ///
		day#c.trump_margin "Trump margin $\times$ Day FE")
					

	#delimit ;
		estout
		using "$repo/mobility_rob_localpolicies.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home $local
		 c.post_tweet_stay_home#c.trump_margin) 
		order(post_tweet_stay_home c.post_tweet_stay_home#c.trump_margin $local)
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr

	#delimit ;
		estout
		using "$repo/mobility_footer_local.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(none,relax)
		indicate("County FE=0.ccode" "Day FE = 0.day" 
		"Demographics $\times$ Day FE = 0.day#c.med_age"
		"Trump margin $\times$ Day FE = 0.day#c.trump_margin" 
		"COVID controls = covid_cases"
		"Other tweets = post_tweet_social_dist"
		"Orders = post_stayhome")
		mlabels(, none) nobaselevels  ;
	#delimit cr

**Table SI-14: Governors’ stay home tweets and mobility by governor’s party, census block-group-level**

use "$data/precinct_data", clear

local i = 0
foreach opt in "" "if rep_gov==0" "if rep_gov==1" {
local i = `i' + 1

eststo clear

preserve
use "$data/SG_county_data.dta", clear

keep if matched==1

replace trump_margin = trump_margin*10

eststo : reghdfe median_home_dwell_time post_tweet_stay $orders $tweets `opt', absorb(day ccode) cl(statefp) keepsingle

eststo : reghdfe median_home_dwell_time c.post_tweet_stay##c.trump_margin $orders $tweets `opt', ///
	absorb(day##c.(trump_margin) ccode) cl(statefp) keepsingle

restore

eststo : reghdfe median_home_dwell_time post_tweet_stay $orders $tweets `opt', absorb(day cbg_id) cl(statefp) keepsingle

eststo : reghdfe median_home_dwell_time c.post_tweet_stay##c.trump_margin $orders $tweets `opt', ///
	absorb(day##c.(trump_margin) ccode) cl(statefp) keepsingle

eststo : reghdfe median_home_dwell_time c.post_tweet_stay##c.trump_margin $orders $tweets `opt', ///
	absorb(day##c.(trump_margin) cbg_id) cl(statefp) keepsingle

eststo : reghdfe median_home_dwell_time c.post_tweet_stay##c.trump_margin $orders $tweets [aw=wt] `opt', ///
	absorb(day##c.(trump_margin) cbg_id) cl(statefp) keepsingle
	
	#delimit ;
		estout
		using "$repo/mobility_rob_cbg`i'.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home c.post_tweet_stay_home#c.trump_margin) 
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr

	}

	estfe . est*, labels(ccode "County FE" day "Day FE" cbg_id "CBG FE" ///
				day#c.trump_margin "Trump margin $\times$ Day FE")
					

	#delimit ;
		estout
		using "$repo/mobility_footer_cbg.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(none,relax)
		indicate("County FE=0.ccode" "Day FE = 0.day" "CBG FE = 0.cbg_id"
		"Trump margin $\times$ Day FE = 0.day#c.trump_margin" 
		"Other tweets = post_tweet_social_dist"
		"Orders = post_stayhome")
		mlabels(, none) nobaselevels  ;
	#delimit cr

**Table SI-15: Governors’ stay home tweets and mobility, county-specific time trends**

use "$data/SG_county_data.dta", clear


local i = 0
foreach opt in "" "if trump_county==0" "if trump_county==1" {
eststo clear
eststo : reghdfe median_home c.post_tweet_stay_home `opt', absorb(ccode day) cl(statefp)  keepsingle
eststo : reghdfe median_home c.post_tweet_stay_home `opt', absorb(ccode##c.day day) cl(statefp)  keepsingle

eststo : reghdfe median_home c.post_tweet_stay_home $tweets $orders $covid `opt', absorb(ccode day) cl(statefp)  keepsingle
eststo : reghdfe median_home c.post_tweet_stay_home $tweets $orders $covid `opt', absorb(ccode##c.day day) cl(statefp)  keepsingle

eststo : reghdfe median_home c.post_tweet_stay_home $tweets $orders $covid `opt', absorb(ccode day##c.($demogs)) cl(statefp)  keepsingle
eststo : reghdfe median_home c.post_tweet_stay_home $tweets $orders $covid `opt', absorb(ccode##c.day day##c.($demogs)) cl(statefp)  keepsingle

	
	#delimit ;
		estout
		using "$repo/mobility_rob_county_trends_`i'.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_tweet_stay_home) 
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr

	local i = `i' + 1


}
	
	estfe . est*, labels(ccode "County FE" day "Day FE" ///
		day#c.med_age "Demographics $\times$ Day FE" ///
		ccode#c.day "County FE $\times$ linear time trends")
	#delimit ;
		estout
		using "$repo/mobility_footer_trends.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(none,relax)
		indicate("County FE=0.ccode" "Day FE = 0.day" 
		"County FE $\times$ linear time trends = 0.ccode#c.day"
		"Demographics $\times$ Day FE = 0.day#c.med_age"
		"COVID controls = covid_cases"
		"Other tweets = post_tweet_social_dist"
		"Orders = post_stayhome")
		mlabels(, none) nobaselevels  ;
	#delimit cr

**Table SI-16: Governors’ stay home Facebook posts and mobility**

gl fbposts post_fb_covid post_fb_social_dist


eststo clear
foreach y in median_home logtimehome {
	
	eststo : reghdfe `y' post_fb_stay_home $fbposts $covid $orders, ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle

	eststo : reghdfe `y' c.post_fb_stay_home##c.trump_margin $fbposts $covid $orders, ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle


}
	#delimit ;
		estout
		using "$repo/mobility_panelA_rob_fb.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_fb_stay_home c.post_fb_stay_home#c.trump_margin) 
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr

eststo clear
foreach y in median_home logtimehome {
	
	eststo : reghdfe `y' post_fb_stay_home $fbposts $covid $orders if rep_gov==0, ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle

	eststo : reghdfe `y' c.post_fb_stay_home##c.trump_margin $fbposts $covid $orders  if rep_gov==0, ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle


}
	#delimit ;
		estout
		using "$repo/mobility_panelB_rob_fb.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_fb_stay_home c.post_fb_stay_home#c.trump_margin) 
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr
	
eststo clear
foreach y in median_home logtimehome {
	
	eststo : reghdfe `y' post_fb_stay_home $fbposts $covid $orders if rep_gov==1, ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle

	eststo : reghdfe `y' c.post_fb_stay_home##c.trump_margin $fbposts $covid $orders  if rep_gov==1, ///
		absorb(ccode day day#c.trump_margin day#c.($demogs)) cl(statefp) keepsingle
	
}

	#delimit ;
		estout
		using "$repo/mobility_panelC_rob_fb.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(post_fb_stay_home c.post_fb_stay_home#c.trump_margin) 
		mlabels(, none) nobaselevels 
		stats(N r2, fmt( %9.0g  %9.3f) 
		labels("Observations" "\$R^2\$") layout(@)) $slvl ;
	#delimit cr

	estfe . est*, labels(ccode "County FE" day "Day FE" ///
		day#c.med_age "Demographics $\times$ Day FE" ///
		day#c.trump_margin "Trump margin $\times$ Day FE")
		
	#delimit ;
		estout
		using "$repo/mobility_by_gov_party_footer.tex", replace 
		style(tex) collabels(, none) label cells(b(star fmt(%9.3f)) se(par)) 
		keep(none,relax) 
		mlabels(, none) nobaselevels 
		indicate("County FE=0.ccode" "Day FE = 0.day" 
		"Demographics $\times$ Day FE = 0.day#c.med_age"
		"Trump margin $\times$ Day FE = 0.day#c.trump_margin"
		"COVID controls = covid_cases"
		"Other tweets = post_fb_social_dist"
		"Orders = post_stayhome") ;
	#delimit cr

		
